import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 引入移动端适配插件
import 'amfe-flexible'
import directive from '@/utils/directive.js'
import { allChannelListApi } from './api'
import { NavBar, Form, Field, Button, Tabbar, TabbarItem, Search, Icon, Tab, Tabs, Cell, List, PullRefresh, ActionSheet, Area, Popup, Row, Col, Badge, Divider } from 'vant'

Vue.use(Divider)
Vue.use(directive)
Vue.use(Search)
Vue.use(Badge)
Vue.use(Row)
Vue.use(Col)
Vue.use(Popup)
Vue.use(Area)
Vue.use(ActionSheet)

Vue.use(PullRefresh)

Vue.use(List)

Vue.use(Cell)

Vue.use(Tab)
Vue.use(Tabs)

Vue.use(Icon)

Vue.use(Tabbar)
Vue.use(TabbarItem)

Vue.use(Button)

Vue.use(Form)
Vue.use(Field)

Vue.use(NavBar)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app')

const myFn = async () => {
  try {
    const res = await allChannelListApi()
    console.log(res)
  } catch (err) {
    // console.error(err)
    console.dir(err.message)
  }
}

myFn()
